<%--
    Document   : sun
    Created on : Jun 4, 2010, 8:09:44 PM
    Author     : sunil
--%>

<%@attribute name="autocompleter" type="java.lang.Boolean"%>
<%@attribute name="enableFormatting" type="java.lang.Boolean"%>
<%@attribute name="enableAjaxForm" type="java.lang.Boolean"%>
<%@taglib uri="/WEB-INF/tld/c.tld" prefix="c"%>
<%@taglib tagdir="/WEB-INF/tags/hunk/" prefix="hunk"%>
<c:if test="${autocompleter}">
    <c:choose>
        <c:when test="${autocomplete != null}">
            <hunk:prompt text="Autocompleter is already initialized." type="warning"/>
        </c:when>
        <c:otherwise>
            <link rel="stylesheet" type="text/css" href="css/jquery.autocomplete.css" />
            <script src="${path}/js/autocomplete/jsapi.js" type="text/javascript" ></script>        
            <script src="${path}/js/autocomplete/jquery.autocomplete.js" type="text/javascript" ></script>
        </c:otherwise>
    </c:choose>
    <c:set var="autocomplete" value="autocomplete" scope="request"/>
</c:if>
<c:if test="${enableAjaxForm}">
    <script src="${path}/js/ajax/jquery.form.js" type="text/javascript" ></script>
</c:if>

<c:if test="${enableFormatting}">
    <script>
        $('.currency').currencyFormat();
    </script>
</c:if>